home *** CD-ROM | disk | FTP | other *** search
- /*bdos.c --- p 552 */
- #include <stdio.h>
- #include <dos.h>
- /* DOS function to read from keyboard */
- #define DOS_KBDIN 1
- main()
- {
- unsigned int ch_read;
- /* Nothing needs to be specified for DX and AL. Use 0's
- * Also, zero out the high-order byte by bitwise AND with FFh */
- ch_read = bdos(DOS_KBDIN, 0, 0) & 0xff;
- printf("\nCharacter read = %c\n", ch_read);
- }